<%@ page language="java" import="java.util.*" import="java.sql.*" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- saved from url=(0022)http://blog.csdn.net/electroniXtar/ -->
<html>
<head>
	<meta http-equiv="content-type" content="text/html" />
	<meta name="author" content="blog.anchen8.net" />
	<title>毕业生，你的选择</title>
    <link rel="stylesheet" type="text/css" href="../css/personal.css" />
    <link rel="stylesheet" type="text/css" href="../css/WriteBlog.css" />
    <script src="../js/jQuery1.82.js" type="text/javascript"></script>
    <script type="text/javascript">
        function createMain(){
            var _scrollWidth=Math.max(document.body.scrollWidth,document.documentElement.scrollWidth);
            var _scrollHeight=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight);
                document.getElementById("main").style.left=(_scrollWidth-950)/2+"px";
               // document.getElementById("m").style.height=_scrollHeight+"px";
        }
        function naviover(val){
            document.getElementById(val).style.backgroundColor="#E1DACF";
        }
        function naviout(val){
            document.getElementById(val).style.backgroundColor="#C5C5C5";
        }
        $(document).ready(function() {
        	$("#nameExist").hide();
			/*	2nd example	*/
			
			$("#menu2 li a").wrapInner( '<span class="out"></span>' );
			
			$("#menu2 li a").each(function() {
				$( '<span class="over">' +  $(this).text() + '</span>' ).appendTo( this );
			});

			$("#menu2 li a").hover(function() {
				$(".out",	this).stop().animate({'top':	'45px'},	200); // move down - hide
				$(".over",	this).stop().animate({'top':	'0px'},		200); // move down - show

			}, function() {
				$(".out",	this).stop().animate({'top':	'0px'},		200); // move up - show
				$(".over",	this).stop().animate({'top':	'-45px'},	200); // move up - hide
			});
			
			$("#writetitle").focus(function(){
				$("#nameExist").hide();
			});
			$("#writetitle").blur(function(){
				$.post("/Bys-Website/CheckData",{
    	    		method:3,
    	    		title: $("#writetitle").val()
    	    	},function(data){
    	    		if(data=="have data"){
    	    			$("#nameExist").show();
    	    		}
    	    	});
			});

		});
    </script>
</head>
<jsp:useBean id="sql" scope="page" class="com.tzq.JAVABEAN.ConnectDB" />
<%if(session.getAttribute("pid")==null){%>
	<jsp:forward page="/Public/PublicMainPage.jsp"></jsp:forward>
	<% }
	String sessionid = session.getAttribute("pid").toString();
	String usernameString = session.getAttribute("username").toString(); %>
<body class="body">
    <div class="main" id="main">
        <span class="title"><%=usernameString %>的空间</span>
        <div id="menu2" class="menu">
			<ul>
				<li id="info"><a href="/Bys-Website/PersonMainPage.jsp?userID=<%=sessionid%>">个人信息</a></li>
				<li id="video"><a href="/Bys-Website/PersonVideo/MyVideo.jsp?userid=<%=sessionid %>">个人视频</a></li>
				<li id="photo"><a href="/Bys-Website/PersonImage/MyImage.jsp?userid=<%=sessionid%>">个人相册</a></li>
				<li id="blog"><a href="/Bys-Website/PersonBlog/MyBlog.jsp?userid=<%=sessionid%>">个人博客</a></li>
				<li><a href="javascript:;">Contacts</a></li>
			</ul>
		</div>
        <div id="blogde">
        	<form action="WriteBlogServlet?method=0" method="post">
            <div class="blogtitle">
                &nbsp;写博客
                    <input type="submit" value="发表"/>
            </div>
            <div class="blogcontext">
                <div class="heretitle">
                <h1>标题</h1>
                        <input id="writetitle" type="text" name="BlogTitle"/><label id="nameExist">标题已存在</label>
                </div>
                <div class="text">
                    <textarea name="BlogArticle"></textarea>
                </div>
            </div>
            </form>
        </div>
    </div>
    <script>    
        createMain();
    </script>
    <div class="topbar">
        <div class="logo">
            <a href="/Bys-Website/Public/home.jsp">
	           	<img src="/Bys-Website/SourceImageFile/toplogo.jpg"/>
			</a>
        </div>
        <div class="navi">
            <ul class="naviul">
                <li><a href="/Bys-Website/Public/Video.jsp" class="outli">视频</a></li>
				<li><a href="/Bys-Website/Public/Photo.jsp" class="outli">相册</a></li>
				<li><a href="/Bys-Website/Public/Blog.jsp" class="inli">博客</a></li>
            </ul>
        </div>
        <div class="loginfo">
            <ul class="loginfoul">
                <%if(session.getAttribute("pid")==null){%>
				<li><a href="/Bys-Website/Log_in.jsp">登录</a></li>
				<li><a href="/Bys-Website/Regist.jsp">注册</a></li>
			<%}else{
				 %>
				<li><a href="../PersonMainPage.jsp?userID=<%=sessionid  %>"><%=session.getAttribute("username").toString()%></a></li>
				<li><a href="../LoginServlet?method=1">退出</a></li>
			<%}%>
            </ul>
        </div>
    </div>
</body>
</html>